Returns a System.IO.Stream for the file inside the LRM package referenced by filePath.
Parent Type: LrmPackageReader
Namespace: Microsoft.LearningComponents
Assembly: Microsoft.LearningComponents.dll
| C# |
|
public override Stream GetFileStream ( ) |
filePath
The file to retrieve. The path is relative to the root of the file hierarchy in the LRM package. If this path indicates a file that is not in the LRM package, a System.IO.FileNotFoundException is thrown.
System.IO.Stream for the specified file.
| Exception type | Condition |
| IOException | The file is already open. |
| ArgumentException | filePath contains invalid characters. |
| ArgumentNullException | filePath is null. |
| InvalidOperationException | The LrmPackageReader is in an error state. |
| FileNotFoundException | The file specified was not found. |
| Name | Description |
| System.Security.Permissions.FileIOPermission | for creating directories and reading and writing files. Associated enumerations: System.Security.Permissions.FileIOPermissionAccess.Read and System.Security.Permissions.FileIOPermissionAccess.Write. |
filePath is a relative path to the root of the LRM package.
The LRM package will be exploded into a temporary directory when this method is called, if not done previously.